package com.injurydetection.www.util.network;


import com.injurydetection.www.bean.PostBean;
import com.injurydetection.www.bean.PostBean2;
import com.injurydetection.www.bean.PostReceive2;
import com.injurydetection.www.bean.PostResponse;

import io.reactivex.Observable;

public class ApiWrapper extends RetrofitHttpUtils {
    private static volatile ApiWrapper apiWrapper;

    private ApiWrapper() {
        init();
    }

    public static ApiWrapper getInstance() {
        if (apiWrapper == null) {
            synchronized (ApiWrapper.class) {
                if (apiWrapper == null) {
                    apiWrapper = new ApiWrapper();
                }
            }
        }
        return apiWrapper;
    }


    public Observable<PostResponse> post(PostBean postBean) {
        return getApiServer().post(postBean);
    }

    public Observable<PostReceive2> post2(PostBean2 postBean2) {
        return getApiServer().post2(postBean2);
    }
}